//
//  ZH_MineOtherInfoTableViewCell.m
//  WisdomStar
//
//  Created by zhangliwen on 2018/10/22.
//  Copyright © 2018年 zhangliwen. All rights reserved.
//

#import "ZH_MineOtherInfoTableViewCell.h"
@interface ZH_MineOtherInfoTableViewCell()
@property (nonatomic,weak)UILabel *leftLabel;
@property (nonatomic,weak)UILabel *contentLabel;
@property (nonatomic,weak)UIImageView *rightImage;
@end
@implementation ZH_MineOtherInfoTableViewCell

///创建
+(instancetype)cellWithTableView:(UITableView*)tableView
{
    static NSString *ID = @"ZH_MineOtherInfoTableViewCell";
    ZH_MineOtherInfoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell == nil){
        cell = [[ZH_MineOtherInfoTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
}
///初始化
-(void)initDefault
{
    [self unShowClickEffect];
    self.bottomShortLineImage.hidden = NO;
}
- (void)loadSubviewConstraints{
    [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(FITSCALE(13));
        make.left.equalTo(self.contentView).offset(FITSCALE(22));
        make.bottom.equalTo(self.contentView).offset(FITSCALE(-13));
    }];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(self.leftLabel.mas_right).offset(FITSCALE(30));
    }];
    [self.rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView).offset(FITSCALE(-22));
    }];
}
- (void)setLeftString:(NSString *)leftString{
    self.leftLabel.text = leftString;
}
- (void)setContentString:(NSString *)contentString{
    self.contentLabel.text = contentString;
}
#pragma mark - getter,setter
- (UILabel *)leftLabel{
    if (!_leftLabel) {
        UILabel *label = [UILabel createLabelWithText:@"" font:kFontSize_28];
        [self.contentView addSubview:_leftLabel = label];
    }
    return _leftLabel;
}
- (UILabel *)contentLabel{
    if (!_contentLabel) {
        UILabel *label = [UILabel createLabelWithText:@"" font:kFontSize_28];
        [self.contentView addSubview:_contentLabel = label];
    }
    return _contentLabel;
}
- (UIImageView *)rightImage{
    if (!_rightImage) {
        UIImageView *image = [UIImageView createImageViewWithName:@"icon_mygetmore1"];
        [self.contentView addSubview:_rightImage = image];
    }
    return _rightImage;
}
@end
